<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>家政网后台</title>
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <link rel="stylesheet" href="../Xadmin/css/xadmin.css">
  <link rel="stylesheet" href="../Xadmin/css/login.css">
  <link rel="stylesheet" href="../Xadmin/css/font.css">
  <script src="../layui/layui.js" charset="utf-8"></script>
  <script src="../JS/BaseJS.js" charset="utf-8"></script>
  <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body style="padding: 50px">
<div style="margin-top: 30px;left: 50%;top:10%;transform: translate(-50%,-10%);position: absolute">
  <div style="margin-top: 30px">
    id:
    <div class="layui-inline" style="float: right;right: -20px;margin-top: -10px">
      <input class="layui-input" id="id" autocomplete="off" readonly="readonly"/>
    </div>
  </div>

  <div style="margin-top: 30px">
    标题:
    <div class="layui-inline" style="float: right;right: -20px;margin-top: -10px">
      <input class="layui-input" id="Title" autocomplete="off"/>
    </div>
  </div>

  <div style="margin-top: 30px">
    图片:
    <div class="layui-inline" style="float: right;right: -20px;margin-top: -10px">
      <input class="layui-input" id="Image" autocomplete="off"/>
    </div>
  </div>

  <div style="margin-top: 30px">
    介绍:
    <div class="layui-inline" style="float: right;right: -20px;margin-top: -10px">
      <input class="layui-input" id="Context" autocomplete="off"/>
    </div>
  </div>

<button class="layui-btn" data-type="reload" onclick="UPAcyivity()"style="margin: 30px auto;margin-left: 30px">修改</button>
  <button class="layui-btn" data-type="reload" onclick="UPAcyivity()"style="margin: 30px auto;margin-left: 30px">取消</button>
  </div>
</body>
<script>
  var layer
  layui.use('layer',function () {//导入layer组件
    layer = layui.layer
  })
  $(function(){//页面加载
    $("#id").val(localStorage.getItem("Uid1"))
    $("#Title").val(localStorage.getItem("nickName1"))
    $("#Image").val(localStorage.getItem("phone1"))
    $("#Context").val(localStorage.getItem("address1"))
  } )
  function  UPAcyivity(){//修改用户信息
    $.ajax({
      url:BaseUrl+"Activity/Activity",
      method:"put",
      data:{
        Title:$("#Title").val(),
        Image:$("#Image").val(),
        Context:$("#Context").val(),
        id:$("#id").val()
      },success:function (res){
        var object = JSON.parse(res)
        layer.alert(object.msg)
      }

    })
  }
</script>
</html>